﻿using System;
using System.Collections.Generic;
 
using System.Text;

namespace GGSharp.Http
{
    public class AccountOperationInfo : HttpStructureBase
    {
        private int _number;

        public int Number
        {
            get { return _number; }
            protected set { _number = value; }
        }

        public override void Read(System.IO.StreamReader reader)
        {
            string[] response = reader.ReadToEnd().Split(':');

            if (response[0] == "reg_success")
            {
                Int32.TryParse(response[1], out _number);
                this.State = RequestState.Ready;
            }
            else
                this.State = RequestState.Error;
        }
    }
}
